package com.gc.frontend.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gc.common.dto.PeopleDTO;
import com.gc.common.entity.People;
import com.gc.common.exception.RollBackException;
import com.gc.common.mapper.PeopleMapper;
import com.gc.frontend.service.PeopleService;

/**
 * 
 * @author 章瑱彬 
 * 电话：15914921094
 * QQ：562800930
 * @since 2015年3月9日
 */
@Service
public class PeopleServiceImpl implements PeopleService{
	@Autowired
	PeopleMapper peopleMapper;
	
	@Override
	public int deleteByPrimaryKey(Integer id) {
		try {
			peopleMapper.deleteByPrimaryKey(id);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return 0;
	}

	@Override
	public int insert(People record) {
		
		return 0;
	}

	@Override
	public int insertSelective(People record) {
		return 0;
	}

	@Override
	public People selectByPrimaryKey(Integer id) {
		return null;
	}

	@Override
	public int updateByPrimaryKeySelective(People record) {
		return 0;
	}

	@Override
	public int updateByPrimaryKey(People record) {
		return 0;
	}

	@Override
	public List<People> selectByDTO(PeopleDTO dto) {
		return null;
	}

	@Override
	public void testTx() throws RollBackException{
		try {
			People people = new People();
			people.setPeopleDuty("仙人1");
			people.setPeopleName("zzb");
			people.setSectorId(2);
			people.setPeopleId(2);
			peopleMapper.insert(people);

		} catch (Exception e) {
			e.printStackTrace();
			throw new RollBackException(e);
		}
	}

	@Override
	public int deleteInIds(String ids) {
		return 0;
	}
	
}
